<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Struct template concept_interface</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../boost_typeerasure/reference.html#header.boost.type_erasure.concept_interface_hpp" title="Header &lt;boost/type_erasure/concept_interface.hpp&gt;">
<link rel="prev" href="check_match.html" title="Function check_match">
<link rel="next" href="concept_of.html" title="Struct template concept_of">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="check_match.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_typeerasure/reference.html#header.boost.type_erasure.concept_interface_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concept_of.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.type_erasure.concept_interface"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct template concept_interface</span></h2>
<p>boost::type_erasure::concept_interface</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../boost_typeerasure/reference.html#header.boost.type_erasure.concept_interface_hpp" title="Header &lt;boost/type_erasure/concept_interface.hpp&gt;">boost/type_erasure/concept_interface.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> Concept<span class="special">,</span> <span class="keyword">typename</span> Base<span class="special">,</span> <span class="keyword">typename</span> ID<span class="special">,</span> <span class="keyword">typename</span> Enable <span class="special">=</span> <span class="keyword">void</span><span class="special">&gt;</span> 
<span class="keyword">struct</span> <a class="link" href="concept_interface.html" title="Struct template concept_interface">concept_interface</a> <span class="special">:</span> <span class="keyword">public</span> <span class="identifier">Base</span> <span class="special">{</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.40.13.10.3.4"></a><h2>Description</h2>
<p>The <a class="link" href="concept_interface.html" title="Struct template concept_interface">concept_interface</a> class can be specialized to add behavior to an <a class="link" href="any.html" title="Class template any">any</a>. An <a class="link" href="any.html" title="Class template any">any</a> inherits from all the relevant specializations of <a class="link" href="concept_interface.html" title="Struct template concept_interface">concept_interface</a>.</p>
<p><a class="link" href="concept_interface.html" title="Struct template concept_interface">concept_interface</a> can be specialized for either primitive or composite concepts. If a concept <code class="computeroutput">C1</code> contains another concept <code class="computeroutput">C2</code>, then the library guarantees that the specialization of <a class="link" href="concept_interface.html" title="Struct template concept_interface">concept_interface</a> for <code class="computeroutput">C2</code> is a base class of the specialization for <code class="computeroutput">C1</code>. This means that <code class="computeroutput">C1</code> can safely override members of <code class="computeroutput">C2</code>.</p>
<p><a class="link" href="concept_interface.html" title="Struct template concept_interface">concept_interface</a> may only be specialized for user-defined concepts. The library owns the specializations of its own built in concepts.</p>
<p>
The metafunctions <a class="link" href="derived.html" title="Struct template derived">derived</a>, <a class="link" href="rebind_any.html" title="Struct template rebind_any">rebind_any</a>, and <a class="link" href="as_param.html" title="Struct template as_param">as_param</a> (which can be applied to <code class="computeroutput">Base</code>) are useful for determining the argument and return types of functions defined in <a class="link" href="concept_interface.html" title="Struct template concept_interface">concept_interface</a>.</p>
<p>For dispatching the function use  <a class="link" href="call.html" title="Function call">call</a>. </p>
<div class="refsect2">
<a name="id-1.3.40.13.10.3.4.7"></a><h3>Template Parameters</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">typename</span> Concept</pre>
<p>The concept that we're specializing <code class="computeroutput"><a class="link" href="concept_interface.html" title="Struct template concept_interface">concept_interface</a></code> for. One of its placeholders should be <code class="computeroutput">ID</code>. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">typename</span> Base</pre>
<p>The base of this class. Specializations of <code class="computeroutput"><a class="link" href="concept_interface.html" title="Struct template concept_interface">concept_interface</a></code> must inherit publicly from this type. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">typename</span> ID</pre>
<p>The placeholder representing this type. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">typename</span> Enable <span class="special">=</span> <span class="keyword">void</span></pre>
<p>A dummy parameter that can be used for SFINAE.</p>
</li>
</ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2011-2013 Steven Watanabe<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="check_match.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_typeerasure/reference.html#header.boost.type_erasure.concept_interface_hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concept_of.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
